import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      component: resolve => require(['../components/Login.vue'], resolve)
    },
    {
      path: '*',
      redirect: '/Login',
      component: resolve => require(['../components/Login.vue'], resolve)
    },
    {
      path: '/Login',
      component: resolve => require(['../components/Login.vue'], resolve)
    },
    {
      path: '/Home',
      component: resolve => require(['../components/Home.vue'], resolve),
      children: [
        { path: '/Home/Commodity_ification', component: resolve => require(['../components/page/Commodity_ification.vue'], resolve) },
        { path: '/Home/Commodity_list', component: resolve => require(['../components/page/Commodity_list.vue'], resolve) },
        { path: '/Home/Article_classification', component: resolve => require(['../components/page/Article_classification.vue'], resolve) }
      ]
    }
  ]
})
